package org.github.manx98.jlibhac.ns;

import lombok.Data;
import org.github.manx98.jlibhac.common.math.Uint16;
import org.github.manx98.jlibhac.common.math.Uint32;
import org.github.manx98.jlibhac.common.math.Uint64;
import org.github.manx98.jlibhac.common.reflect.StructureMap;
import org.github.manx98.jlibhac.util.StringUtil;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/5 15:21
 */
@Data
public class ApplicationControlProperty {
    @StructureMap(offset = 0, length = 16)
    public ApplicationTitle[] Title;
    @StructureMap(offset = -1, length = 37)
    public byte[] Isbn;
    @StructureMap(offset = -2)
    public StartupUserAccountValue StartupUserAccount;
    @StructureMap(offset = -3)
    public UserAccountSwitchLockValue UserAccountSwitchLock;
    @StructureMap(offset = -4)
    public AddOnContentRegistrationTypeValue AddOnContentRegistrationType;
    @StructureMap(offset = -5)
    public AttributeFlagValue AttributeFlag;
    @StructureMap(offset = -6)
    public Uint32 SupportedLanguageFlag;
    @StructureMap(offset = -7)
    public ParentalControlFlagValue ParentalControlFlag;
    @StructureMap(offset = -8)
    public ScreenshotValue Screenshot;
    @StructureMap(offset = -9)
    public VideoCaptureValue VideoCapture;
    @StructureMap(offset = -10)
    public DataLossConfirmationValue DataLossConfirmation;
    @StructureMap(offset = -11)
    public PlayLogPolicyValue PlayLogPolicy;
    @StructureMap(offset = -12)
    public Uint64 PresenceGroupId;
    @StructureMap(offset = -13, length = 32)
    public byte[] RatingAge;
    @StructureMap(offset = -14, length = 16)
    public String DisplayVersion;
    @StructureMap(offset = -15)
    public Uint64 AddOnContentBaseId;
    @StructureMap(offset = -16)
    public Uint64 SaveDataOwnerId;
    @StructureMap(offset = -17)
    public long UserAccountSaveDataSize;
    @StructureMap(offset = -18)
    public long UserAccountSaveDataJournalSize;
    @StructureMap(offset = -19)
    public long DeviceSaveDataSize;
    @StructureMap(offset = -20)
    public long DeviceSaveDataJournalSize;
    @StructureMap(offset = -21)
    public long BcatDeliveryCacheStorageSize;
    @StructureMap(offset = -22, length = 8)
    public byte[] ApplicationErrorCodeCategory;
    @StructureMap(offset = -23, length = 8)
    public Uint64[] LocalCommunicationId;
    @StructureMap(offset = -24)
    public LogoTypeValue LogoType;
    @StructureMap(offset = -25)
    public LogoHandlingValue LogoHandling;
    @StructureMap(offset = -26)
    public RuntimeAddOnContentInstallValue RuntimeAddOnContentInstall;
    @StructureMap(offset = -27)
    public RuntimeParameterDeliveryValue RuntimeParameterDelivery;
    @StructureMap(offset = -28, length = 2)
    public byte[] Reserved30F4;
    @StructureMap(offset = -29)
    public CrashReportValue CrashReport;
    @StructureMap(offset = -30)
    public HdcpValue Hdcp;
    @StructureMap(offset = -31)
    public Uint64 SeedForPseudoDeviceId;
    @StructureMap(offset = -32, length = 65)
    public byte[] BcatPassphrase;
    @StructureMap(offset = -33)
    public StartupUserAccountOptionFlagValue StartupUserAccountOption;
    @StructureMap(offset = -34, length = 6)
    public byte[] ReservedForUserAccountSaveDataOperation;
    @StructureMap(offset = -35)
    public long UserAccountSaveDataSizeMax;
    @StructureMap(offset = -36)
    public long UserAccountSaveDataJournalSizeMax;
    @StructureMap(offset = -37)
    public long DeviceSaveDataSizeMax;
    @StructureMap(offset = -38)
    public long DeviceSaveDataJournalSizeMax;
    @StructureMap(offset = -39)
    public long TemporaryStorageSize;
    @StructureMap(offset = -40)
    public long CacheStorageSize;
    @StructureMap(offset = -41)
    public long CacheStorageJournalSize;
    @StructureMap(offset = -42)
    public long CacheStorageDataAndJournalSizeMax;
    @StructureMap(offset = -43)
    public Uint16 CacheStorageIndexMax;
    @StructureMap(offset = -44)
    public byte Reserved318A;
    @StructureMap(offset = -45)
    public byte RuntimeUpgrade;
    @StructureMap(offset = -46)
    public Uint32 SupportingLimitedLicenses;
    @StructureMap(offset = -47, length = 16)
    public Uint64[] PlayLogQueryableApplicationId;
    @StructureMap(offset = -48)
    public PlayLogQueryCapabilityValue PlayLogQueryCapability;
    @StructureMap(offset = -49)
    public RepairFlagValue RepairFlag;
    @StructureMap(offset = -50)
    public byte ProgramIndex;
    @StructureMap(offset = -51)
    public RequiredNetworkServiceLicenseOnLaunchValue RequiredNetworkServiceLicenseOnLaunchFlag;
    @StructureMap(offset = -52, length = 4)
    public byte[] Reserved3214;
    @StructureMap(offset = -53)
    public ApplicationNeighborDetectionClientConfiguration NeighborDetectionClientConfiguration;
    @StructureMap(offset = -54)
    public ApplicationJitConfiguration JitConfiguration;
    @StructureMap(offset = -55)
    public RequiredAddOnContentsSetBinaryDescriptor RequiredAddOnContentsSetBinaryDescriptors;
    @StructureMap(offset = -56)
    public PlayReportPermissionValue PlayReportPermission;
    @StructureMap(offset = -57)
    public CrashScreenshotForProdValue CrashScreenshotForProd;
    @StructureMap(offset = -58)
    public CrashScreenshotForDevValue CrashScreenshotForDev;
    @StructureMap(offset = -59)
    public byte ContentsAvailabilityTransitionPolicy;
    @StructureMap(offset = -60, length = 4)
    public byte[] Reserved3404;
    @StructureMap(offset = -61)
    public AccessibleLaunchRequiredVersionValue AccessibleLaunchRequiredVersion;
    @StructureMap(offset = -62, length = 3000)
    public byte[] Reserved3448;

    public String getDisplayVersionString() {
        return DisplayVersion;
    }
}
